<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>首页</title>
    <meta name="Keywords" content="书">
    <link href="__PUBLIC__/home/css/public.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/home/css/index.css" rel="stylesheet" type="text/css">
    <script src="__PUBLIC__/home/js/jquery.js"></script>
</head>
<body id="body" style="overflow-x:hidden">

    <div class="w">
        <div id="topads"></div>

        <!--页头-->
        <include file="./Public/header.html" />

        <!--商品分类 开始-->
        <div class="header-nav">
            <div class="wrap">
                <div class="catalogs">
                    <div class="catalogs-title"><a href="javascript:;">全部商品分类▼</a></div>
                    <div class="catalogs-list block" style="display:none">
                        <!-- 遍历顶级分类 -->
                        <foreach name="type" item="cats">
                            <div class="item">
                            <h3 class="t01_channelhome"><a href="__MODULE__/Goodslist/index/catsid/<{$cats.catsid}>"><i></i><{$cats.catsname}><s>&gt;</s></a></h3>
                            <div class="sub-item">
                                <h4><a href="__MODULE__/Goodslist/index/catsid/<{$cats.catsid}>"><{$cats.catsname}></a></h4>
                                <div class="sub-list">
                                    <!--遍历子分类-->
                                    <foreach name="cats['subcat']" item="cat">
                                        <a href="__MODULE__/Goodslist/index/soncatsid/<{$cat.catsid}>/catsname/<{$cat.catsname}>" target="_self"><{$cat.catsname}></a>
                                    </foreach>
                                </div>
                                <div class="catalogs-ad">
                                    <a href="__MODULE__/Goodslist/index/catsid/$cats['catsid']"><img style="width:215px;" src="__ROOT__/Public/home/imgs/yangguang.jpg" alt="$cats['catsname']"></a>
                                </div>
                            </div>
                            </div>
                        </foreach>
                        <!-- 分类结束 -->
                    </div>
                </div>
            </div>
        </div>
        <!--商品分类 结束-->

        <!------- 轮播广告 ------>
        <div style="overflow: hidden;position: relative;width: 100%;top: -38px;">
            <ul id="lubo" >
            <foreach name='lubn' item='img'>
                <li>
                    <div style="width:100%;overflow:hidden;">
                        <img src="__PUBLIC__/Upload/<{$img.img}>"  width="100%">
                    </div>
                </li>
             </foreach>
             </ul>
        </div>
        <script>
        $(function(){
            $('#lubo li').eq(0).css('display','block');                //设置第一张图片显示
            $('#lubo li').eq(0).siblings().css('display','none');      //设置除了第一张图片其他的图片都隐藏
            //显示函数
            function show(i){
               $("#lubo li").eq(i).css('display','block');             //第i张图片显示
               $("#lubo li").eq(i).siblings().css('display','none');   //除了第i张图片其他的图片都隐藏

            }
            var lis=$('#lubo li').length; //计算图片总数
            var i=0;
            var init=null;
            //设置定时函数
            function auto(){
                init=setInterval(function(){
                    //调用显示函数，每4000毫秒循环一次
                    show(i);
                    i++;
                    if(i==lis){
                        i=0;
                    }
                },4000);
            }
            //调用定时函数
            auto();
        })
        </script>

        <!-- 商品楼层 -->
        <foreach name="topcats" item="allgoods" key="key">
            <div class="floor wrap 01_channelhome clearfix loadfloor loaded" id="t01_channelhome" data-url="/Home/Floor?floorId=01_channelhome">
                <div class="floor-title ">
                    <h2><a href="__MODULE__/Goodslist/index/catsid/<{$allgoods.catsid}>" target="_self"><{$allgoods.catsname}></a></h2>
                </div>

                <div class="floor-con floor-layout2">
                    <div class="floor-side"><a href="__MODULE__/Goodslist/index/catsid/<{$allgoods.catsid}>" target="_self"><img src="__ROOT__/Public/home/imgs/floor/<{$key}>.png" width="275"></a></div>
                    <div class="floor-main">
                        <ul>
                            <foreach name="allgoods['goods']" item="good" key="k">
                            <li><a href="__MODULE__/Goodsdetail/index/goodsid/<{$k}>" target="_self"><div class="div1"><span class="span1"></span><img class="img1" src="__ROOT__/Public/Upload/<{$good}>"></div></a></li>
                            </foreach>
                        </ul>
                    </div>
                </div>
            </div>
        </foreach>


        <!--页尾-->
        <include file="./Public/footer.html" />


         <!-- 侧边悬浮  -->
        <div class="sidebar" id="sidebar">
            <a href="" class="s-btn goTop" style="display: none;"></a>
        </div>

    </div>


    <script src="__PUBLIC__/home/js/base.js"></script>
</body>
</html>